package com.finance.cooperate.feature.reader;

import com.finance.cooperate.feature.base.ReaderImpl;
import com.finance.cooperate.feature.core.feature.FeatureDefinition;
import com.finance.cooperate.feature.dto.IdentityDTO;

import java.util.Map;

/**
 * @ClassName IdentityReader
 * @Description 身份信息抽取
 * @Author shen
 * @Date 2022/5/26 22:44
 * @Modify ...
 */
public class IdentityReader extends ReaderImpl {

    @Override
    public Map<String, String> read(String userId) {

        IdentityDTO info = identityService.getInfo(userId);

        super.put(FeatureDefinition.f_identity_birthday_age, info.getBirthdayAge());
        super.put(FeatureDefinition.f_identity_gender, info.getGender());
        super.put(FeatureDefinition.f_identity_loan_use, info.getLoanUse());


        return super.getResult();
    }

}
